package com.groupname.dangerousdelves;

//-------------------------------------------------------------------------
/**
*  This class listens and responds to events about the dungeon.
*
*  @author Chris Fieldman (Chrisf90)
*  @version 2012.11.13
*/
public class DungeonListener
    implements IEventListener
{
 //~-------------------------------------------------------------------------
 // Member Variables
 private Dungeon dungeon;

 //~-------------------------------------------------------------------------
 // Member Variables
 /**
  * Create a new DungeonListener object.
  * @param newDungeon The dungeon this listener listens for events for
  */
 public DungeonListener(Dungeon newDungeon)
 {
     this.dungeon = newDungeon;
 }

 //~-------------------------------------------------------------------------
 // Member Variables
 /**
  * Process the event sent to this listener. We only only need to process
  * the event types registered to this listener.
  */
 @SuppressWarnings("incomplete-switch")
 public void processEvent(IEventData data)
 {
     switch (data.getEventType())
     {
         case OpenDoor:
             EventData_Open_Door doorData = (EventData_Open_Door)data;
             int id = doorData.getId();

             //Room room = this.dungeon.getRoom(id);

             //room.buildContents(this.dungeon);

             break;
     }
 }
}